package com.payment.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.payment.common.support.Convert;
import com.payment.system.domain.CompanyMoneyChang;
import com.payment.system.mapper.CompanyMoneyChangMapper;
import com.payment.system.service.ICompanyMoneyChangService;

/**
 * 公司入账记录 服务层实现
 * 
 * @author payment
 * @date 2019-12-03
 */
@Service
public class CompanyMoneyChangServiceImpl implements ICompanyMoneyChangService 
{
	@Autowired
	private CompanyMoneyChangMapper companyMoneyChangMapper;

	/**
     * 查询公司入账记录信息
     * 
     * @param id 公司入账记录ID
     * @return 公司入账记录信息
     */
    @Override
	public CompanyMoneyChang selectCompanyMoneyChangById(String id)
	{
	    return companyMoneyChangMapper.selectCompanyMoneyChangById(id);
	}
	
	/**
     * 查询公司入账记录列表
     * 
     * @param companyMoneyChang 公司入账记录信息
     * @return 公司入账记录集合
     */
	@Override
	public List<CompanyMoneyChang> selectCompanyMoneyChangList(CompanyMoneyChang companyMoneyChang)
	{
	    return companyMoneyChangMapper.selectCompanyMoneyChangList(companyMoneyChang);
	}
	
    /**
     * 新增公司入账记录
     * 
     * @param companyMoneyChang 公司入账记录信息
     * @return 结果
     */
	@Override
	public int insertCompanyMoneyChang(CompanyMoneyChang companyMoneyChang)
	{
	    return companyMoneyChangMapper.insertCompanyMoneyChang(companyMoneyChang);
	}
	
	/**
     * 修改公司入账记录
     * 
     * @param companyMoneyChang 公司入账记录信息
     * @return 结果
     */
	@Override
	public int updateCompanyMoneyChang(CompanyMoneyChang companyMoneyChang)
	{
	    return companyMoneyChangMapper.updateCompanyMoneyChang(companyMoneyChang);
	}

	/**
     * 删除公司入账记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteCompanyMoneyChangByIds(String ids)
	{
		return companyMoneyChangMapper.deleteCompanyMoneyChangByIds(Convert.toStrArray(ids));
	}

	@Override
	public Map<String, Object> selectCompanyMoneyChangTotalMoney(CompanyMoneyChang companyMoneyChang) {
		return companyMoneyChangMapper.selectCompanyMoneyChangTotalMoney(companyMoneyChang);
	}

}
